<script lang="ts" setup>
	interface IProps {
		icon: string,
		title: string
	}
	
	defineOptions({
		name: 'DetailTitle'
	});

	const props = withDefaults(defineProps<IProps>(), {
		icon: '',
		title: ''
	});
</script>

<template>
	<div class="title-bd">
		<h1>
			<span :class="['iconfont', props.icon]"></span>
			<span class="title">{{ props.title }}</span>
		</h1>
	</div>
</template>

<style lang="scss" scoped>
	@import '../../../../assets/styles/variables.scss';

	.title-bd {
		display: flex;
		align-items: center;
		height: .44rem;
		padding: 0 .15rem;
		background-color: #fff;
		border-bottom: 1px solid #ddd;
		line-height: .44rem;
		box-sizing: border-box;

		.iconfont {
			font-size: .18rem;
			color: $defaultGreen;
		}

		.title {
			font-size: .16rem;
			color: $defaultGreen;
		}
	}
</style>